<?php if($total > 1): ?>
<div class="pagination">
    <?php
        $s = str_replace('&page='.$page , '' , $s);        
		$a_pa = get_start_pagination($page , $total , 5);
        $start = $a_pa['start'];
        $limit_display = $a_pa['end'];
    ?>
    <ul>
	<li>
	    <?php $pagePrev = $page - 1;?>
	    <?php if($page == 1): ?>
		<a title="Trang đầu" class="disable" > Đầu </a>
	    <?php else: ?>
		<a class="" title="Trang đầu" href="<?php print $prefix_url . $s . '&page=1'?>"> Đầu </a>
	    <?php endif; ?>
	</li>
	<li>
	    <?php $pagePrev = $page - 1;?>
	    <?php if($page == 1): ?>
		<a title="Trang trước" class="disable"> &lt; </a>
	    <?php else: ?>
		<a class="" title="Trang trước" href="<?php print $prefix_url . $s . '&page=' . $pagePrev;?>"> &lt; </a>
	    <?php endif; ?>
	</li>

	<?php for($i = $start ; $i <= $limit_display; $i++ ): ?>
	<li>
	    <?php if($i == $page): ?>
		<a class="current" title="Trang <?php print $i;?>">
		    <?php print $i;?>
		</a>
	    <?php else: ?>
	    <a class="linkNumber" title="Trang <?php print $i;?>" href="<?php print $prefix_url . $s . '&page=' . $i;?>">
		<?php print $i;?>
	    </a>
	    <?php endif; ?>
	</li>			
	<?php endfor;?>
	<li>
	    <?php $pageEnd = $page + 1;?>
	    <?php if($page == $total): ?>
		<a title="Trang sau" class="disable"> &gt; </a>
	    <?php else: ?>
		<a class="" title="Trang sau" href="<?php print $prefix_url . $s . '&page=' . $pageEnd;?>"> > </a>
	    <?php endif;?>
	</li>
	<li>
	    <?php $pageEnd = $page + 1;?>
	    <?php if($page == $total): ?>
		<a title="Trang cuối" class="disable">Cuối</a>
	    <?php else: ?>
		<a class="" title="Trang cuối" href="<?php print $prefix_url . $s . '&page=' . $total; ?>"> Cuối </a>
	    <?php endif; ?>
	</li>
	<span class="clf"></span>
    </ul>
</div>
<div class="clf"></div>
<?php endif; ?>
